<?php echo $this->fetch('top.html'); ?>
<div id="header" class="w-full">
    <div class="shop-t w clearfix">
        <div class="logo">
            <a href="<?php echo $this->_var['site_url']; ?>" title="<?php echo $this->_var['site_title']; ?>"><img alt="<?php echo $this->_var['site_title']; ?>" src="<?php echo $this->_var['site_logo']; ?>" /></a>
        </div>
        <div class="top-search">
            <div class="top-search-box clearfix">
                <ul class="top-search-tab clearfix">
                    <li data-id="index" class="current"><span>商品</span></li>
                    <li data-id="store"><span>店铺</span></li>
                </ul>
                <div class="form-fields">
                    <form method="GET" action="<?php echo url('app=search'); ?>">
                        <input type="hidden" name="app" value="search" />
                        <input type="hidden" name="act" value="<?php if ($_GET['act'] == 'store'): ?>store<?php else: ?>index<?php endif; ?>" />
                        <input type="text"   name="keyword" value="<?php echo htmlspecialchars($_GET['keyword']); ?>" class="keyword <?php if (! $_GET['keyword']): ?>kw_bj <?php if ($_GET['act'] == 'store'): ?>store<?php else: ?>index<?php endif; ?>_bj <?php endif; ?>" />
                        <input type="submit" value="&#xf00d9;" class="iconfont submit" hidefocus="true" />
                    </form>
                </div>
            </div>
            <?php if ($_GET['act'] == 'store'): ?>
            <script>
                $(function(){
                    $(".top-search-tab li[data-id=store]").each(function(){
                    $(this).parent().prepend($(this));
                });
                });
            </script>
            <?php endif; ?>
            <div class="top-search-keywords">
                <?php $_from = $this->_var['hot_keywords']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'keyword');$this->_foreach['fe_keyword'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_keyword']['total'] > 0):
    foreach ($_from AS $this->_var['keyword']):
        $this->_foreach['fe_keyword']['iteration']++;
?>
                <a <?php if (($this->_foreach['fe_keyword']['iteration'] <= 1)): ?>style="color:#f10215;"<?php endif; ?> href="<?php echo url('app=search&keyword=' . urlencode($this->_var['keyword']). ''); ?>"><?php echo $this->_var['keyword']; ?></a>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            </div>
        </div>
        <div class="qrcode" style="position:absolute;right:0px;top:25px;width:188px;height:33px">
            <h4 href="index.php?app=cart">扫码下载地址</h4>
            <img src="/data/files/mall/download/download1.png" style="width: 100px;"/>
        </div>
    </div>
    <div class="w-full mall-nav" >
        <div class="w clearfix">
            <ul class="float-left navitems">
                <?php $_from = $this->_var['navs']['middle']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'nav');if (count($_from)):
    foreach ($_from AS $this->_var['nav']):
?>
                <li class="each float-left inline-block"><a class="<?php if (! $this->_var['index'] && $this->_var['nav']['link'] == $this->_var['current_url']): ?>current<?php endif; ?>" href="<?php echo $this->_var['nav']['link']; ?>"<?php if ($this->_var['nav']['open_new']): ?> target="_blank"<?php endif; ?>><?php echo htmlspecialchars($this->_var['nav']['title']); ?><?php if ($this->_var['nav']['hot'] == 1): ?><span class="absolute block"></span><?php endif; ?></a></li>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            </ul>
        </div>
    </div>
</div>
<div class="fix_search">
    <div class="w">
        <div class="top-search">
            <div class="top-search-box clearfix">
                <ul class="top-search-tab clearfix">
                    <li data-id="index" class="current"><span>商品</span></li>
                    <li data-id="store"><span>店铺</span></li>
                </ul>
                <div class="form-fields">
                    <form method="GET" action="<?php echo url('app=search'); ?>">
                        <input type="hidden" name="app" value="search" />
                        <input type="hidden" name="act" value="<?php if ($_GET['act'] == 'store'): ?>store<?php else: ?>index<?php endif; ?>" />
                        <input type="text"   name="keyword" value="<?php echo htmlspecialchars($_GET['keyword']); ?>" class="keyword <?php if (! $_GET['keyword']): ?>kw_bj <?php if ($_GET['act'] == 'store'): ?>store<?php else: ?>index<?php endif; ?>_bj <?php endif; ?>" />
                        <input type="submit" value="&#xf00d9;" class="iconfont submit" hidefocus="true" />
                    </form>
                </div>
            </div>

        </div>
    </div>
</div>
